]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
dash: during drag, only offer trash can when dragging favorites
authorOwen W. Taylor <otaylor@fishsoup.net>
Tue, 3 May 2011 17:22:06 +0000 (13:22 -0400)
committerOwen W. Taylor <otaylor@fishsoup.net>
Wed, 25 May 2011 20:43:24 +0000 (16:43 -0400)
We should only show the trash can when the user starts dragging a
favorite from the dash, not when the user starts dragging an application
that happens to be a favorite via a window or an application icon
in the applications view.

https://bugzilla.gnome.org/show_bug.cgi?id=642895

js/ui/dash.js

index af9f1b46cca9786c0685001a6f9e7e614dad2c94..10f1408fafc536b76560e2d677c89a87dfd7dd6b 100644 (file)
@@ -342,7 +342,10 @@ Dash.prototype = {
 
         let srcIsFavorite = (id in favorites);
 
-        if (srcIsFavorite && this._favRemoveTarget == null) {
+        if (srcIsFavorite &&
+            dragEvent.source.actor &&
+            this.actor.contains (dragEvent.source.actor) &&
+            this._favRemoveTarget == null) {
                 this._favRemoveTarget = new RemoveFavoriteIcon();
                 this._favRemoveTarget.icon.setIconSize(this.iconSize);
                 this._box.add(this._favRemoveTarget.actor);